package com.atmc.service;

import com.atmc.bean.User;
import com.atmc.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;
    @Override
    public List<User> selectAll() {
        return userMapper.selectAll();
    }

    @Override
    public User selectOne(String user_name) {
        return userMapper.selectOne(user_name);
    }

    @Override
    public int updateOne(User user) {
        return userMapper.updateOne(user);
    }

    @Override
    public int deleteOne(Integer user_id) {
        return userMapper.deleteOne(user_id);
    }

    @Override
    public int insertOne(User user) {
        return userMapper.insertOne(user);
    }
}
